Skip to content

feat(harness): user-scope profile slice 1 (Claude + Codex) - #465

Merged
solomonneas merged 12 commits into
mainfrom
feat/issue-438-user-scope-harness-slice1
Jul 23, 2026
Merged

feat(harness): user-scope profile slice 1 (Claude + Codex)#465
solomonneas merged 12 commits into
mainfrom
feat/issue-438-user-scope-harness-slice1

Conversation

@solomonneas

@solomonneas solomonneas commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Partial implementation of #438: user-scope harness parity, slice 1.

  • Shared profile layer for path mapping, planned actions, conflict reporting, receipts, ownership state, idempotent sync, doctor, and exact uninstall.
  • Dry-run command surface, with --write required for mutation:
    • brigade harness sync --target all|claude|codex --scope user
    • brigade harness doctor --target all|claude|codex --scope user
    • brigade harness uninstall --target all|claude|codex --scope user
  • Claude Code surfaces: ~/.claude/CLAUDE.md, ~/.claude/skills, and the existing Claude user MCP adapter.
  • Codex surfaces: ~/.codex/AGENTS.md, ~/.codex/skills, and the existing Codex user MCP adapter.
  • Two-phase preflight for --target all --write, so a conflict in either harness prevents partial application.
  • Fail-closed receipt validation, marker handling, and symlink checks before uninstall or native user-surface writes.

The implementation reuses the canonical MCP catalog and existing per-harness user MCP adapters. User-authored instruction content and foreign MCP entries are preserved.

Follow-ups outside this PR

Refs #438. This is a partial slice and does not close the issue.

Verification

  • brigade work verify run --target . --command "pytest -q tests/test_harness_user_scope.py tests/test_harness_profile_cmd.py" --capture brigade-work
    • 42 passed in 4.43s
  • brigade work verify run --target . --command "./scripts/verify" --capture brigade-work
    • lint and formatting passed
    • mypy: Success: no issues found in 318 source files
    • version sync: version=0.25.1 checked=13 locations
    • managed snapshots: ok (6 manifests)
    • pytest: 4134 passed, 3 skipped in 368.83s
    • coverage: 82.55% against the 78% floor

Focused coverage includes dry-run versus --write, preservation of hand-authored instruction content, idempotent re-sync with MCP enabled, conflict reporting, exact owned-artifact uninstall, receipt drift, symlink rejection, cross-harness preflight, and doctor drift detection.

solomonneas and others added 10 commits July 23, 2026 17:17
Co-Authored-By: Cursor <cursoragent@cursor.com>
Co-Authored-By: Cursor <cursoragent@cursor.com>
Co-Authored-By: Cursor <cursoragent@cursor.com>
Co-Authored-By: Cursor <cursoragent@cursor.com>
Co-Authored-By: Cursor <cursoragent@cursor.com>
Co-Authored-By: Cursor <cursoragent@cursor.com>
Co-Authored-By: Cursor <cursoragent@cursor.com>
Co-Authored-By: Cursor <cursoragent@cursor.com>
Co-Authored-By: Codex <codex@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Project the canonical MCP catalog into Claude and Codex user-scope
profiles, keep Cursor on the legacy install path, and add focused
acceptance tests for dry-run, preservation, idempotence, uninstall,
and doctor drift.

Refs #438

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 35194d0a-6c17-4591-badf-43a8cca145c9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/issue-438-user-scope-harness-slice1

Comment @coderabbitai help to get the list of available commands.

Refs #438

Co-authored-by: Cursor <cursoragent@cursor.com>
@solomonneas solomonneas self-assigned this Jul 23, 2026
Co-Authored-By: Codex <codex@openai.com>
@solomonneas
solomonneas merged commit a03ae76 into main Jul 23, 2026
28 checks passed
solomonneas added a commit that referenced this pull request Jul 23, 2026
…ofiles (#467)

Extend the slice-1 user-scope profile layer (#465) with the five
remaining issue #438 harnesses behind the same sync/doctor/uninstall
contract: dry-run default, receipt-based ownership, idempotent sync,
and uninstall that removes only Brigade-owned artifacts.

- OpenClaw: marked block in the canonical workspace AGENTS.md,
  ~/.openclaw/skills, existing openclaw MCP adapter.
- Kimi Code: capability probe selects ~/.kimi over ~/.kimi-code, with
  the profile carrying the probed MCP path; new kimi-user adapter
  (mcpServers JSON) round-trips foreign keys.
- Grok CLI: ~/.grok AGENTS.md + skills, existing grok-user adapter.
- Cursor: instructions ride the managed plugin/rule/hook surface from
  cursor_user_cmd (whole-file managed rule + generated plugin/hook
  artifacts + one managed hooks.json sessionStart entry), existing
  cursor-user adapter.
- OpenCode: ~/.config/opencode AGENTS.md + skills, new opencode-user
  adapter for the global config.

The profile engine gains generated-file and co-owned hook planning on
top of the pre-reserved state section; slice-1 Claude/Codex behavior is
unchanged. --target all now covers all seven harnesses.

Closes #438

Co-authored-by: Claude <noreply@anthropic.com>
@solomonneas
solomonneas deleted the feat/issue-438-user-scope-harness-slice1 branch July 26, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant